<layout name="inner"/>

<include file="Public:angular"/>
<load href="__PUBLIC__/{:UIKIT}/css/components/notify.css"/>
<load href="__PUBLIC__/{:UIKIT}/js/components/notify.min.js"/>

<load href="__PUBLIC__/{:UIKIT}/css/components/tooltip.min.css"/>
<load href="__PUBLIC__/{:UIKIT}/js/components/tooltip.min.js"/>

<script>
App.controller("chpwdCtrl",["$http","$interval","$scope",function($http,$interval,$scope){

$scope.apply_data={
email_button_default:"Send verify code",
default_time:60,
disable:false
};

$scope.emailSend=function(url){

$.getJSON(url,function(data){
	UIkit.notify(data.info,{status:'warning'});
});

$scope.apply_data.disable=true;
var timer=$interval ( function ( ){
$scope.apply_data.default_time--;
if($scope.apply_data.default_time==0){
$interval. cancel ( timer );
$scope.apply_data.disable=false;
}
},1000);
}



}]);

$(function(){
	$("#validate_form1").validate();
})
</script>	

<p class="uk-text-bold">{$Think.lang.profile}
&nbsp;<button class="uk-button uk-button-success" data-uk-modal="{target:'#myModal',center:true}">{$Think.lang.change_pwd}</button>
&nbsp;<button class="uk-button uk-button-primary" data-uk-modal="{target:'#myModal1',center:true}">{$Think.lang.change_pay_pwd}</button>
</p>
<hr>
<ul class="uk-grid uk-grid-small uk-grid-width-small-1-1  uk-grid-width-medium-1-2 uk-grid-width-large-1-3 uk-text-left" data-uk-grid-margin>
    <li><div class="uk-alert">{$Think.lang.email}：{$merchant_info.mh_email}</div></li>
    <li><div class="uk-alert">{$Think.lang.phone}：{$merchant_info.mh_phone}</div></li>
    <li><div class="uk-alert">{$Think.lang.country}：{$merchant_info.mh_country}</div></li>
	<li><div class="uk-alert">{$Think.lang.state}：{$merchant_info.mh_state}</div></li>
	<li><div class="uk-alert">{$Think.lang.service}：{$merchant_info.mh_service}</div></li>
	<li><div class="uk-alert">{$Think.lang.merchant_type}：{$merchant_info['mh_type']?'Person':'Company'}</div></li>
</ul>
<p class="uk-text-bold">{$Think.lang.fee_structure}</p>
<hr>
<ul class="uk-grid uk-grid-small uk-grid-width-small-1-1  uk-grid-width-medium-1-2 uk-grid-width-large-1-3 uk-text-left" data-uk-grid-margin>
    <li><div class="uk-alert">{$Think.lang.process_rate}：{$merchant_info['mh_process_rate']*100}%</div></li>
    <li><div class="uk-alert">{$Think.lang.cb_fee}：{$merchant_info.mh_cb_fee}</div></li>
    <li><div class="uk-alert">{$Think.lang.refund_fee}：{$merchant_info.mh_refund_fee}</div></li>
    <li><div class="uk-alert">{$Think.lang.failed_fee}：{$merchant_info.mh_failed_fee}</div></li>
    <li><div class="uk-alert">{$Think.lang.withdraw_fee}：{$merchant_info.mh_withdraw_fee}</div></li>
    <li><div class="uk-alert">{$Think.lang.rolling_rate}：{$merchant_info['mh_rolling_rate']*100}%</div></li>
	 <li><div class="uk-alert">{$Think.lang.fixed_fee}：{$merchant_info.mh_fixed_fee}</div></li>
    <li><div class="uk-alert">
		<i data-uk-tooltip title="{$Think.lang.rolling_days_tip}" class="uk-icon-question-circle"></i>&nbsp;{$Think.lang.rolling_days}：{$merchant_info.mh_rolling_days}(days)</div></li>
</ul>
<p class="uk-text-bold">{$Think.lang.limits}</p>
<hr>
<ul class="uk-grid uk-grid-small uk-grid-width-small-1-1  uk-grid-width-medium-1-2 uk-grid-width-large-1-3 uk-text-left" data-uk-grid-margin>
    <li><div class="uk-alert">{$Think.lang.vt}&nbsp;&nbsp;{$Think.lang.status}：{$merchant_info.mh_isvt|displayIcon}</div></li>
	<li><div class="uk-alert">{$Think.lang.min_withdraw}：{$merchant_info.mh_min_withdraw_amount}</div></li>
    <li><div class="uk-alert">{$Think.lang.max_order_amount}：{$merchant_info.mh_max_process_amount}</div></li>
    <li><div class="uk-alert">{$Think.lang.card_daily}：{$merchant_info['mh_card_daily']?$merchant_info['mh_card_daily']:'Unlimited'}</div></li>
	 <li><div class="uk-alert">{$Think.lang.success_card_daily}：{$merchant_info['mh_card_success_daily']?$merchant_info['mh_card_success_daily']:'Unlimited'}</div></li>
    <li><div class="uk-alert">{$Think.lang.failed_card_daily}：{$merchant_info['mh_card_failed_daily']?$merchant_info['mh_card_failed_daily']:'Unlimited'}</div></li>
    <li><div class="uk-alert">{$Think.lang.success_user_daily}：{$merchant_info['mh_user_daily']?$merchant_info['mh_user_daily']:'Unlimited'}</div></li>
    <li><div class="uk-alert">
		<i class="uk-icon-question-circle" data-uk-tooltip title="{$Think.lang.hold_days_tip}"></i>&nbsp;
		{$Think.lang.hold_days}：{$merchant_info.mh_covered_days}(days)</div></li>	
</ul>


<!-- Modal -->
<div class="uk-modal" id="myModal">
 <form id="validate_form" class="uk-form"  method="post" action="__CONTROLLER__/modifyPwd">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.change_pwd}</div>

<table class="uk-table">

	<tr><td width=120>{$Think.lang.old_pwd}</td><td>
<input type="password" name="old_pwd"   required value="" />
</td></tr>
<tr><td>{$Think.lang.new_pwd}
</td><td>
<input type="password" name="new_pwd" id="new_pwd"   required minlength="6" value="" />
</td></tr>
<tr><td>{$Think.lang.confirm_new_pwd}
</td><td>
<input type="password" name="confirm_new_pwd"  equalTo="#new_pwd" minlength="6"  required  value="" />
</td></tr>
  </table>
        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">{$Think.lang.save}</button>
		</div>
    </div>
  </form> 
</div>	


<!-- Modal -->
<div ng-controller="chpwdCtrl" class="uk-modal" id="myModal1">
 <form id="validate_form1" class="uk-form"  method="post" action="__CONTROLLER__/modifyPaypwd">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.change_pay_pwd}</div>

<table class="uk-table">

	<tr><td width=120>{$Think.lang.old_pwd}</td><td>
<input type="password" name="old_pwd"   required value="" />

</td></tr>
<tr><td>{$Think.lang.new_pwd}
</td><td>
<input type="password" name="new_pwd" id="new_pwd1"   required minlength="6" value="" />
</td></tr>
<tr><td>{$Think.lang.confirm_new_pwd}
</td><td>
<input type="password" name="confirm_new_pwd"  equalTo="#new_pwd1" minlength="6"  required  value="" />
</td></tr>
<tr><td>{$Think.lang.email_verify}
</td><td>
<input type="text" name="verify"   required class="uk-width-1-4" value="" />
<p>
<button type="button" ng-disabled="apply_data.disable" ng-click="emailSend('__CONTROLLER__/mailTo')" 
		class="uk-button uk-button-primary">{{apply_data.disable?apply_data.default_time+" S ...":apply_data.email_button_default}}</button>
</p>

</td></tr>
  </table>
        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">{$Think.lang.save}</button>
		</div>
    </div>
  </form> 
</div>	